<?php
/**
 * Created by PhpStorm.
 * User: mac
 * Date: 2021/3/15
 * Time: 10:58 PM
 */

namespace App\Factory\absfactory;




use App\Factory\LDCheesePizza;
use App\Factory\LDPepperPizza;

class LDFactory implements AbsFactory
{

    public function createPizza($orderType)
    {
        // TODO: Implement createPizza() method.
        echo "~\"~ʹõǳ󹤳ģʽ~\"~";
        $pizza = null;
        if($orderType == "cheese") {
            $pizza = new LDCheesePizza();
        } else if ($orderType == "pepper"){
            $pizza = new LDPepperPizza();
        }
        return $pizza;
    }
}